﻿using FMStudio.Documents.TemplateDocument.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace FMStudio.Documents.TemplateDocument.Models
{
    public class ProjectTemplateContent : TemplateContent
    {
        #region Fields
        private string name;
        private string targetName;
        #endregion

        public ProjectTemplateContent()
        {
        }

        #region Properties
        /// <summary>
        /// Gets or sets the name of the folder.
        /// </summary>
        [XmlAttribute()]
        [Required(ErrorMessageResourceName = "ProjectNameMandatory", ErrorMessageResourceType = typeof(Resources))]
        public string Name
        {
            get { return this.name; }
            set
            {
                if (this.name != value)
                {
                    this.name = value;
                    RaisePropertyChanged("Name");
                }
            }
        }

        /// <summary>
        /// Gets or sets the name of the target project.
        /// </summary>
        [XmlAttribute()]
        [Required(ErrorMessageResourceName = "ProjectTargetNameMandatory", ErrorMessageResourceType = typeof(Resources))]
        public string TargetName
        {
            get { return this.targetName; }
            set
            {
                if (this.targetName != value)
                {
                    this.targetName = value;
                    RaisePropertyChanged("TargetName");
                }
            }
        }
        #endregion
    }
}
